﻿using System.Web.Http;

namespace CommodityApi.Controllers
{
    /// <summary>
    /// 商品信息
    /// </summary>
    public class HomeController : ApiController
    {
        /// <summary>
        /// 商品信息测试
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public string Test()
        {
            return "商品Api Test";
        }

        /// <summary>
        /// 获取商品信息v1版本
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        [Route("home/get")]
        public string Get()
        {
            return "商品Api";
        }

        /// <summary>
        /// 获取商品信息v2版本
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        [Route("Home/get/v2")]
        public string Get1()
        {
            return "商品Api v2版本";
        }
    }
}
